#pragma once

#include <type_traits>

namespace dave
{
	namespace maths
	{

		template< typename DataType, int DimensionCount >
		struct Point
		{
			static_assert(std::tr1::is_pod<DataType>::value, "Can only use POD type in point struct!");

			typedef typename DataType type;

			DataType const& Get(int in_index) const 
			{ 
				return components[in_index];
			}

			DataType& Get(int in_index) 
			{ 
				return components[in_index];
			}

			DataType& operator[](int in_index) { return components[in_index]; }

			DataType const& operator[](int in_index) const{ return components[in_index]; }

		private:
			DataType components[DimensionCount > 0 ? DimensionCount : -1];
		};

	}
}